<template>
    <div class="inspector-information-table-content">
        <div style="background: #fff;z-index: 99;padding-top: 10px;">
            <div style="display: flex;justify-content: center;margin: 10px 0 0 0;">
                <h2>专家登记</h2>
            </div>
            <div :class="windowWidth < 480 ?'inspector-info-step-v':''">
                <a-steps :current="stepCurrent" type="navigation" size="small">
                    <a-step title="身份认证" />
                    <a-step title="登记信息" />
                    <a-step title="打印盖章" />
                </a-steps>
            </div>
        </div>
        <!-- <div style="margin-top: 117px;"></div> -->
        <div class="inspector-information-bottom-v">
            <div class="inspector-registration-first-step" v-if="!stepNum">
                <div class="inspector-table-from-d table-from-d-car" >
                    <div class="inspector-table-text table-text-car">
                        
                        <span class="table-text-s"><span class="inspector-asterisk-v first-asterisk-v">*</span>身份证号</span>
                        <span>：</span>
                    </div>
                    <div class="right-content-v" >
                        <a-form ref="form" :form="form">
                            <a-form-item >
                                <a-input
                                @change="idCardChange"
                                style="width: 100%;" 
                                v-model:value="firstStepData.fsfzh" 
                                v-decorator="['fsfzh',{ initialValue:firstStepData.fsfzh, rules: rules.fsfzh}]"
                                placeholder="请输入身份证号码" 
                                :maxLength="18"
                                />
                            </a-form-item>
                        </a-form>
                        <!-- <a-input style="width: 100%;" v-model:value="fsfzh" placeholder="请输入身份证号码" /> -->
                    </div>
                </div>
                <div class="inspector-table-from-d table-from-d-car" v-if="isCard">
                    <div class="inspector-table-text table-text-car">
                        
                        <span class="table-text-s"><span class="inspector-asterisk-v first-asterisk-v">*</span>手机号码</span>
                        <span>：</span>
                    </div>
                    <div class="right-content-v" >
                        <a-form ref="form" :form="form">
                            <a-form-item >
                                <a-input
                                style="width: 100%;" 
                                @change="phoneChange"
                                v-model:value="firstStepData.phone" 
                                v-decorator="['phone',{ initialValue:firstStepData.phone, rules: rules.phone}]"
                                placeholder="请输入手机号码" 
                                />
                            </a-form-item>
                        </a-form>
                        <!-- <a-input style="width: 100%;" v-model:value="fsfzh" placeholder="请输入身份证号码" /> -->
                    </div>
                </div>
                <div class="inspector-table-from-d table-from-d-car" v-if="isCode">
                    <div class="inspector-table-text table-text-car">
                        
                        <span class="table-text-s"><span class="inspector-asterisk-v first-asterisk-v">*</span>验证码</span>
                        <span>：</span>
                    </div>
                    <div class="right-content-v" >
                        <a-form ref="form" :form="form">
                            <a-form-item >
                                <a-input
                                style="width: 64%;" 
                                v-model:value="firstStepData.code" 
                                v-decorator="['code',{ initialValue:firstStepData.code, rules: rules.code}]"
                                placeholder="请输入验证码" 
                                />
                                <a-button 
                                    class="inspector-table-code-btn-box"
                                    size="small" 
                                    :type="!totalSeconds?'primary':''"
                                    @click.stop.prevent="getCode(hourString,minuteString,secondString)">
                                    <span class="code-text" v-if="!totalSeconds">{{codeText}}</span>
                                    <span class="code-text" v-if="hourString == '00' && minuteString == '00' && secondString == '00' && totalSeconds && !isGetCode ">重新获取</span>
                                    <span class="code-text text-color" v-if="hourString !== '00'">{{hourString+'：'+minuteString+'：'+secondString}}</span>
                                    <span class="code-text text-color" v-else-if="minuteString !== '00'">{{minuteString+'：'+secondString}}</span>
                                    <span class="code-text text-color" v-else-if="secondString !== '00'">{{secondString}}</span>
                                </a-button>
                            </a-form-item>
                        </a-form>
                        <!-- <a-input style="width: 100%;" v-model:value="fsfzh" placeholder="请输入身份证号码" /> -->
                    </div>
                </div>
                <div v-if="isCode" style="text-align: center;color: #999;">（注：验证码有效时长为30分钟）</div>
                <div v-if="isCode" style="display: flex;justify-content: center;margin-top: 30px;">
                    <a-button class="blue-btn" type="primary" @click="nextStep">下一步</a-button>
                </div>
            </div>
            <div class="inspector-registration-second-step" v-if="stepNum == 2 && djbData.djb.fsjcjzt == '填写中'">
                <div style="margin: 0 10px 10px 10px;">
                    <a-button style="margin-right: 10px;" class="blue-btn" type="primary" @click="backclick">返回身份认证</a-button>
                    <a-button class="blue-btn" v-if="djbData.djb.fsjcjzt == '填写中'" type="primary" @click="refreshTable(djbId,1)">刷新登记表</a-button>
                    <a v-if="djbData.djb.fsjcjzt !== '填写中'" @click="exportClick">点击下载登记表</a>
                </div>
                <div>
                    <div class="inspector-table-from-d" id="realname">
                        <div class="inspector-table-text">
                            <span class="table-text-s"><span class="inspector-asterisk-v">*</span>姓名</span>
                            <span>：</span>
                        </div>
                        <div class="right-content-v">
                            <a-input v-if="djbData.djb.fsjcjzt == '填写中'" style="width: 100%;" v-model:value="formField.realname" @blur="basicBlur('realname',formField.realname)" placeholder="请输入姓名" />
                            <span v-else>{{ formField.realname }}</span>
                        </div>
                        
                    </div>
                    <div class="tips-flex" :key='currentIdKey' v-if="currentId == 'realname'"><span class="tips-text-v">请输入姓名</span></div>
                    <div class="inspector-table-from-d" id="sex">
                        <div class="inspector-table-text">
                            <span class="table-text-s"> <span class="inspector-asterisk-v">*</span>性别</span>
                            <span>：</span>
                        </div>
                        <div class="right-content-v">
                            <compSelector
                                widthPercentile="100%"
                                v-if="djbData.djb.fsjcjzt == '填写中'"
                                :key="compSelectorkey"
                                v-model="formField.sex"
                                :defaultValue="formField.sex"
                                compType="Radio"
                                :bigFontSize="true"
                                dictionaryType="性别"
                                @selectHandleChange="selectHandleChange('sex',$event)"
                            />
                            <span v-else>{{ formField.sex == 1?'男':(formField.sex == 1?'女':'') }}</span>
                        </div>
                    </div>
                    <div class="tips-flex" :key='currentIdKey' v-if="currentId == 'sex'"><span class="tips-text-v">请选择性别</span></div>
                    <!-- <div class="inspector-table-from-d" id="birthday">
                        <div class="inspector-table-text">
                            
                            <span class="table-text-s"><span class="inspector-asterisk-v">*</span>出生年月</span>
                            <span>：</span>
                        </div>
                        <div class="right-content-v">
                            <a-month-picker style="width: 100%;" v-if="djbData.djb.fsjcjzt == '填写中'" v-model:value="formField.birthday" placeholder="请选择出生年月" @change="basicBlur('birthday',formField.birthday,1)" />
                            <a-input v-if="djbData.djb.fsjcjzt == '填写中'" style="width: 100%;" v-model:value="formField.birthday" @blur="basicBlur('birthday',formField.birthday)" placeholder="请输入出生年月" />
                            <span v-else>{{ formField.birthday }}</span>
                        </div>
                    </div> -->
                    <!-- <div class="tips-flex" :key='currentIdKey' v-if="currentId == 'birthday'"><span class="tips-text-v">请选择出生年月</span></div> -->
                    <div class="inspector-table-from-d" id="fmz">
                        <div class="inspector-table-text">
                            <span class="table-text-s"><span class="inspector-asterisk-v">*</span>民族</span>
                            <span>：</span>
                        </div>
                        <div class="right-content-v">
                            <compSelector
                                widthPercentile="100%"
                                v-if="djbData.djb.fsjcjzt == '填写中'"
                                :key="compSelectorkey"
                                v-model="formField.fmz"
                                :defaultValue="formField.fmz"
                                compType="Select"
                                :bigFontSize="true"
                                dictionaryType="民族"
                                @selectHandleChange="selectHandleChange('fmz',$event)"
                            />
                            <span v-else>{{ formField.fmz }}</span>
                        </div>
                    </div>
                    <div class="tips-flex" :key='currentIdKey' v-if="currentId == 'fmz'"><span class="tips-text-v">请选择民族</span></div>
                    <div class="inspector-table-from-d" id="fzzmm">
                        <div class="inspector-table-text">
                            <span class="table-text-s"><span class="inspector-asterisk-v">*</span>政治面貌</span>
                            <span>：</span>
                        </div>
                        <div class="right-content-v">
                            <compSelector
                                widthPercentile="100%"
                                v-if="djbData.djb.fsjcjzt == '填写中'"
                                :key="compSelectorkey"
                                v-model="formField.fzzmm"
                                :defaultValue="formField.fzzmm"
                                compType="Select"
                                :bigFontSize="true"
                                dictionaryType="政治面貌"
                                @selectHandleChange="selectHandleChange('fzzmm',$event)"
                            />
                            <span v-else>{{ formField.fzzmm }}</span>
                        </div>
                    </div>
                    <div class="tips-flex" :key='currentIdKey' v-if="currentId == 'fzzmm'"><span class="tips-text-v">请选择政治面貌</span></div>
                    <div class="inspector-table-from-d">
                        <div class="inspector-table-text">
                            <span class="inspector-asterisk-v">*</span>
                            <span class="table-text-s">身份证号</span>
                            <span>：</span>
                        </div>
                        <div class="right-content-v">
                            <span>{{ formField.fsfzh }}</span>
                        </div>
                    </div>
                    <div class="inspector-table-from-d" id="fxl">
                        <div class="inspector-table-text">
                            <span class="table-text-s"><span class="inspector-asterisk-v">*</span>学历</span>
                            <span>：</span>
                        </div>
                        <div class="right-content-v">
                            <compSelector
                                widthPercentile="100%"
                                v-if="djbData.djb.fsjcjzt == '填写中'"
                                :key="compSelectorkey"
                                v-model="formField.fxl"
                                :defaultValue="formField.fxl"
                                compType="Select"
                                :bigFontSize="true"
                                dictionaryType="学历代码"
                                @selectHandleChange="selectHandleChange('fxl',$event)"
                            />
                            <span v-else>{{ formField.fxl }}</span>
                        </div>
                    </div>
                    <div class="tips-flex" :key='currentIdKey' v-if="currentId == 'fxl'"><span class="tips-text-v">请选择学历</span></div>
                    <div class="inspector-table-from-d" id="fzc">
                        <div class="inspector-table-text">
                            <span class="table-text-s"><span class="inspector-asterisk-v">*</span>职称</span>
                            <span>：</span>
                        </div>
                        <div class="right-content-v">
                            <compSelector
                                widthPercentile="100%"
                                v-if="djbData.djb.fsjcjzt == '填写中'"
                                :key="compSelectorkey"
                                v-model="formField.fzc"
                                :defaultValue="formField.fzc"
                                compType="Select"
                                :bigFontSize="true"
                                dictionaryType="职称"
                                @selectHandleChange="selectHandleChange('fzc',$event)"
                            />
                            <!-- <a-input v-if="djbData.djb.fsjcjzt == '填写中'" style="width: 100%;" v-model:value="formField.fzc" @blur="basicBlur('fzc',formField.fzc)" placeholder="请输入职称务" /> -->
                            <span v-else>{{ formField.fzc }}</span>
                        </div>
                    </div>
                    <div class="tips-flex" :key='currentIdKey' v-if="currentId == 'fzc'"><span class="tips-text-v">请选择职称</span></div>
                    <div class="inspector-table-from-d" id="fzw">
                        <div class="inspector-table-text">
                            <span class="table-text-s"><span class="inspector-asterisk-v">*</span>职务</span>
                            <span>：</span>
                        </div>
                        <div class="right-content-v">
                            <a-input v-if="djbData.djb.fsjcjzt == '填写中'" style="width: 100%;" v-model:value="formField.fzw" @blur="basicBlur('fzw',formField.fzw)" placeholder="请输入职务" />
                            <span v-else>{{ formField.fzw }}</span>
                        </div>
                    </div>
                    <div class="tips-flex" :key='currentIdKey' v-if="currentId == 'fzw'"><span class="tips-text-v">请输入职务</span></div>
                    <div class="inspector-table-from-d" id="fbyyx">
                        <div class="inspector-table-text">
                            <span class="table-text-s"><span class="inspector-asterisk-v">*</span>毕业院校</span>
                            <span>：</span>
                        </div>
                        <!-- 大文本 -->
                        <div class="right-content-v">
                            <a-textarea 
                             v-if="djbData.djb.fsjcjzt == '填写中'" 
                             style="width: 100%;" 
                             v-model:value="formField.fbyyx" 
                             @blur="basicBlur('fbyyx',formField.fbyyx)" 
                             :autosize="{ minRows: 2, maxRows: 10000 }"
                             placeholder="请输入毕业院校" />
                            <span v-else>{{ formField.fbyyx }}</span>
                        </div>
                    </div>
                    <div class="tips-flex" :key='currentIdKey' v-if="currentId == 'fbyyx'"><span class="tips-text-v">请输入毕业院校</span></div>
                    <div class="inspector-table-from-d" id="fsxzy">
                        <div class="inspector-table-text">
                            <span class="table-text-s"><span class="inspector-asterisk-v">*</span>所学专业</span>
                            <span>：</span>
                        </div>
                        <div class="right-content-v">
                            <a-input v-if="djbData.djb.fsjcjzt == '填写中'" style="width: 100%;" v-model:value="formField.fsxzy" @blur="basicBlur('fsxzy',formField.fsxzy)" placeholder="请输入所学专业" />
                            <span v-else>{{ formField.fsxzy }}</span>
                        </div>
                    </div>
                    <div class="tips-flex" :key='currentIdKey' v-if="currentId == 'fsxzy'"><span class="tips-text-v">请输入所学专业</span></div>
                    <div class="inspector-table-from-d" id="fcsgz">
                        <div class="inspector-table-text">
                            <span class="table-text-s"><span class="inspector-asterisk-v">*</span>现从事或分管工作</span>
                            <span>：</span>
                        </div>
                        <!-- 大文本 -->
                        <div class="right-content-v">
                            <a-input v-if="djbData.djb.fsjcjzt == '填写中'" style="width: 100%;" v-model:value="formField.fcsgz" @blur="basicBlur('fcsgz',formField.fcsgz)" placeholder="请输入现从事或分管工作" />
                            <span v-else>{{ formField.fcsgz }}</span>
                        </div>
                    </div>
                    <div class="tips-flex" :key='currentIdKey' v-if="currentId == 'fcsgz'"><span class="tips-text-v">请输入现从事或分管工作</span></div>
                    <div class="inspector-table-from-d" id="fgzdw">
                        <div class="inspector-table-text">
                            <span class="table-text-s"><span class="inspector-asterisk-v">*</span>工作单位及部门</span>
                            <span>：</span>
                        </div>
                        <!-- 大文本 -->
                        <div class="right-content-v">
                            <a-textarea
                             v-if="djbData.djb.fsjcjzt == '填写中'" 
                             style="width: 100%;" 
                             v-model:value="formField.fgzdw" 
                             :autosize="{ minRows: 2, maxRows: 10000 }"
                             @blur="basicBlur('fgzdw',formField.fgzdw)" 
                             placeholder="请输入工作单位及部门" />
                            <span v-else>{{ formField.fgzdw }}</span>
                        </div>
                    </div>
                    <div class="tips-flex" :key='currentIdKey' v-if="currentId == 'fgzdw'"><span class="tips-text-v">请输入工作单位及部门</span></div>
                    <div class="inspector-table-from-d" id="fgznx">
                        <div class="inspector-table-text">
                            <span class="table-text-s"><span class="inspector-asterisk-v">*</span>从事技术审评工作年限</span>
                            <span>：</span>
                        </div>
                        <div class="right-content-v">
                            
                            <a-input
                             v-if="djbData.djb.fsjcjzt == '填写中'" 
                             style="width: 100%;" 
                             v-model:value="formField.fgznx" 
                             @blur="basicBlur('fgznx',formField.fgznx)" 
                             placeholder="请输入从事技术审评工作年限" />
                            <span v-else>{{ formField.fgznx }}</span>
                        </div>
                    </div>
                    <div class="tips-flex" :key='currentIdKey' v-if="currentId == 'fgznx'"><span class="tips-text-v">请输入从事技术审评工作年限</span></div>
                    <div style="border-bottom: 5px solid #f6f6f6;margin: 8px 0;"></div>
                    <div class="itable-large-area">
                        <h3 class="text-xfl">联系方式</h3>
                        <div class="itable-content-v">
                            <div class="inspector-table-from-d" id="fgzdwdz">
                                <div class="inspector-table-text">
                                    <span class="table-text-s"><span class="inspector-asterisk-v">*</span>单位地址</span>
                                    <span>：</span>
                                </div>
                                <div class="right-content-v">
                                    <a-textarea
                                     v-if="djbData.djb.fsjcjzt == '填写中'" 
                                     style="width: 100%;" 
                                     v-model:value="formField.fgzdwdz" 
                                     :autosize="{ minRows: 2, maxRows: 10000 }"
                                     @blur="basicBlur('fgzdwdz',formField.fgzdwdz)" 
                                     placeholder="请输入单位地址" />
                                    <span v-else>{{ formField.fgzdwdz }}</span>
                                </div>
                            </div>
                            <div class="tips-flex" :key='currentIdKey' v-if="currentId == 'fgzdwdz'"><span class="tips-text-v">请输入单位地址</span></div>
                            <div class="inspector-table-from-d" id="phone">
                                <!-- 需要校验 -->
                                <div class="inspector-table-text">
                                    <span class="table-text-s"><span class="inspector-asterisk-v">*</span>手机</span>
                                    <span>：</span>
                                </div>
                                <div class="right-content-v">
                                    <!-- <a-input v-if="djbData.djb.fsjcjzt == '填写中'" style="width: 100%;" v-model:value="formField.phone" @blur="basicBlur('phone',formField.phone)" placeholder="请输入手机" /> -->
                                    <span>{{ formField.phone }}</span>
                                </div>
                            </div>
                            <div class="inspector-table-from-d">
                                <div class="inspector-table-text">
                                    <span class="table-text-s">传真号码</span>
                                    <span>：</span>
                                </div>
                                <div class="right-content-v">
                                    <a-input v-if="djbData.djb.fsjcjzt == '填写中'" style="width: 100%;" v-model:value="formField.fcz" @blur="basicBlur('fcz',formField.fcz)" placeholder="请输入传真号码" />
                                    <span v-else>{{ formField.fcz }}</span>
                                </div>
                            </div>
                            <div class="inspector-table-from-d" id="fqqhm">
                                <div class="inspector-table-text">
                                    <span class="table-text-s"><span class="inspector-asterisk-v">*</span>QQ号</span>
                                    <span>：</span>
                                </div>
                                <div class="right-content-v">
                                    <a-input v-if="djbData.djb.fsjcjzt == '填写中'" style="width: 100%;" v-model:value="formField.fqqhm" @blur="basicBlur('fqqhm',formField.fqqhm)" placeholder="请输入QQ号" />
                                    <span v-else>{{ formField.fqqhm }}</span>
                                </div>
                            </div>
                            <div class="tips-flex" :key='currentIdKey' v-if="currentId == 'fqqhm'"><span class="tips-text-v">请输入QQ号</span></div>
                            <a-button style="margin: 5px;margin-left: 111px;" v-if="djbData.djb.fsjcjzt == '填写中'" class="blue-btn" type="primary" @click="()=>{basicBlur('email',formField.fqqhm+'@qq.com')}">使用QQ邮箱</a-button>
                            <div class="inspector-table-from-d" id="email">
                                <div class="inspector-table-text">
                                    <span class="table-text-s"><span class="inspector-asterisk-v">*</span>E-MAIL</span>
                                    <span>：</span>
                                </div>
                                <div class="right-content-v email-suffix-v">
                                    <a-input v-if="djbData.djb.fsjcjzt == '填写中'" style="width: 100%;" v-model:value="formField.email" @blur="basicBlur('email',formField.email)" placeholder="请输入E-MAIL" />
                                    <!-- <span>@</span>
                                    <a-select v-if="djbData.djb.fsjcjzt == '填写中'" v-model:value="emailSuffix">
                                        <a-select-option v-for="(item,index) in eSuffixList" :key="index" :value="item">{{ item }}</a-select-option>
                                    </a-select>
                                    <span v-else>{{ formField.email }}</span> -->
                                </div>
                            </div>
                            <div class="tips-flex" :key='currentIdKey' v-if="currentId == 'email'"><span class="tips-text-v">请输入E-MAIL</span></div>
                        </div>
                    </div>
                    <div style="border-bottom: 5px solid #f6f6f6;margin: 8px 0;"></div>
                    <div class="itable-large-area" id="lbId">
                        <h3 class="text-xfl">
                            <span class="inspector-asterisk-v">*</span>专家分类
                            <div class="tips-flex" style="padding-left: 10px;" :key='currentIdKey' v-if="currentId == 'lbId'"><span class="tips-text-v">请选择专家分类</span></div>
                        </h3>
                        <div class="itable-content-v" :key="lbListKey">
                            <!-- @change="onChange" -->
                            <!-- <a-checkbox-group v-model="lbValue"> -->
                                <div v-for="(item,index) in djbData.lbList" :key="index">
                                    <!-- <a-checkbox :value="item.lb.id" @click="onLbChange(item)"> -->
                                        <a-checkbox class="lb-list-checkbox" :checked="item.fxzzt" @change="onLbChange({...item,index:index})" :disabled="!(djbData.djb.fsjcjzt == '填写中')">
                                            <div>
                                                {{ item.lb.fjcylb }}，近三年参加审评（<a-input :id="'fcjcsInput'+index" :disabled="djbData.djb.fsjcjzt !== '填写中'?true:!item.fxzzt" @blur="fcjcsBlur(item.lb.id,item.fcjcs)" style="width: 80px;" placeholder="输入次数" v-model:value="item.fcjcs"/>）次
                                            </div>
                                        </a-checkbox>
                                        <div style="margin: 5px 28px;" v-if="item.typeList" class="lb-type-list-v">
                                            <a-checkbox-group :defaultValue="item.lb.fjctz?item.lb.fjctz.split(','):[]" :disabled="djbData.djb.fsjcjzt !== '填写中'?true:!item.fxzzt" @change="onTcChange(item.lb.id,$event)">
                                                <h3>特长：</h3>
                                                <div v-for="(trem,tIndex) in item.typeList.split(',')" :key="index" >
                                                    <a-checkbox :value="trem" >{{ trem }}</a-checkbox>
                                                </div>
                                            </a-checkbox-group>
                                        </div>
                                    <!-- </a-checkbox> -->
                                </div>
                            <!-- </a-checkbox-group> -->
                        </div>
                    </div>
                    <div style="border-bottom: 5px solid #f6f6f6;margin: 8px 0;"></div>
                    <div class="itable-large-area" id="jobResId">
                        <h3 class="text-xfl"><span class="inspector-asterisk-v">*</span>
                            工作简历
                            <div class="tips-flex" style="padding-left: 10px;" :key='currentIdKey' v-if="currentId == 'jobResId'"><span class="tips-text-v">请填写工作简历</span></div>
                        </h3>
                        <div class="itable-content-v" :key="jobResumeListKey">
                            <div v-for="(item,index) in jobResumeList" :key="index">
                                <div>{{index+1}}、<a-button v-if="item.id&&djbData.djb.fsjcjzt == '填写中'" class="red-btn" size="small" type="primary" @click="deleteJobResume(item)">删除</a-button></div>
                                <div>
                                    <!-- 工作简历：
                                    工作开始时间 fgzkssj
                                    工作结束时间 fgzjssj
                                    单位名称 fgzdw
                                    工作岗位 fcsgz
                                    职务 fzw -->
                                    <div class="inspector-table-from-d">
                                        <div class="inspector-table-text">
                                            <span class="table-text-s">开始时间</span>
                                            <span>：</span>
                                        </div>
                                        <div class="right-content-v">
                                            <a-month-picker :name="'i'+index" style="width: 100%;" v-if="djbData.djb.fsjcjzt == '填写中'" v-model:value="item.fgzkssj" placeholder="请选择开始时间" @change="(a,b)=>{obResumeBlur('fgzkssj',item,b)}" />
                                            <!-- <a-input v-if="djbData.djb.fsjcjzt == '填写中'" style="width: 100%;" v-model:value="item.fgzkssj" @blur="obResumeBlur('fgzkssj',item,1)" placeholder="请输入开始时间" /> -->
                                            <span v-else>{{ item.fgzkssj?moment(item.fgzkssj).format('YYYY-MM'):'' }}</span>
                                        </div>
                                    </div>
                                    <div class="inspector-table-from-d">
                                        <div class="inspector-table-text">
                                            <span class="table-text-s">结束时间</span>
                                            <span>：</span>
                                        </div>
                                        <div class="right-content-v">
                                            <div style="display: flex;" v-if="djbData.djb.fsjcjzt == '填写中'">
                                                <a-month-picker :name="'a'+index" style="width: 100%;" v-if="item.fgzjssjstr !== '至今'" v-model:value="item.fgzjssjstr"  placeholder="请选择结束时间" @change="(a,b)=>{obResumeBlur('fgzjssjstr',item,b)}" />
                                                <span style="flex: 1;" v-if="item.fgzjssjstr == '至今'">至今</span>
                                                <a-button v-if="item.fgzjssjstr == '至今' " class="blue-btn" type="primary" @click="fgzjssjstrClick('',item,index)">时间</a-button>
                                                <a-button v-if="item.fgzjssjstr !== '至今'" class="blue-btn" type="primary" @click="fgzjssjstrClick('至今',item,index)">至今</a-button>
                                            </div>
                                            
                                            <!-- <a-input v-if="djbData.djb.fsjcjzt == '填写中'" style="width: 100%;" v-model:value="item.fgzjssj" @blur="obResumeBlur('fgzjssj',item,1)" placeholder="请输入结束时间" /> -->
                                            <span v-else>{{  item.fgzjssjstr?moment(item.fgzjssjstr).format('YYYY-MM'):'' }}</span>
                                        </div>
                                    </div>
                                    <div class="inspector-table-from-d">
                                        <div class="inspector-table-text">
                                            <span class="table-text-s">单位名称</span>
                                            <span>：</span>
                                        </div>
                                        <div class="right-content-v">
                                            <a-input v-if="djbData.djb.fsjcjzt == '填写中'" style="width: 100%;" v-model:value="item.fgzdw" @blur="obResumeBlur('fgzdw',item)" placeholder="请输入单位名称" />
                                            <span v-else>{{ item.fgzdw }}</span>
                                        </div>
                                    </div>
                                    <div class="inspector-table-from-d">
                                        <div class="inspector-table-text">
                                            <span class="table-text-s">工作岗位</span>
                                            <span>：</span>
                                        </div>
                                        <div class="right-content-v">
                                            <a-input v-if="djbData.djb.fsjcjzt == '填写中'" style="width: 100%;" v-model:value="item.fcsgz" @blur="obResumeBlur('fcsgz',item)" placeholder="请输入工作岗位" />
                                            <span v-else>{{ item.fcsgz }}</span>
                                        </div>
                                    </div>
                                    <div class="inspector-table-from-d">
                                        <div class="inspector-table-text">
                                            <span class="table-text-s">职务</span>
                                            <span>：</span>
                                        </div>
                                        <div class="right-content-v">
                                            <a-input v-if="djbData.djb.fsjcjzt == '填写中'" style="width: 100%;" v-model:value="item.fzw" @blur="obResumeBlur('fzw',item)" placeholder="请输入职务" />
                                            <span v-else>{{ item.fzw }}</span>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div style="display: flex;justify-content: center;" v-if="djbData.djb.fsjcjzt == '填写中'">
                                <a-button class="blue-btn" type="primary" @click="addWorkExpeClick">添加工作经历</a-button>
                            </div>
                        </div>
                    </div>
                    <div style="border-bottom: 5px solid #f6f6f6;margin: 8px 0;"></div>
                    <div class="itable-large-area">
                        <h3 class="text-xfl">曾发表过技术审评相关文章</h3>
                        <div class="itable-content-v">
                            <div v-for="(item,index) in publishList" :key="index">
                                <div>{{index+1}}、<a-button v-if="item.id&&djbData.djb.fsjcjzt == '填写中'" class="red-btn" size="small" type="primary" @click="deletePublish(item)">删除</a-button></div>
                                <div>
                                    <!-- 发表文章：
                                    发表时间 ffbsj
                                    期刊名称 fqkmc
                                    文章名称及文章所在页码 fwzmc -->
                                    <div class="inspector-table-from-d">
                                        <div class="inspector-table-text">
                                            <span class="table-text-s">发表时间</span>
                                            <span>：</span>
                                        </div>
                                        <div class="right-content-v">
                                            <a-month-picker :name="'i'+index" style="width: 100%;" v-if="djbData.djb.fsjcjzt == '填写中'" v-model:value="item.ffbsj" placeholder="请选择发表时间" @change="(a,b)=>{publishBlur('ffbsj',item,b)}" />
                                            <!-- <a-input v-if="djbData.djb.fsjcjzt == '填写中'" style="width: 100%;" v-model:value="item.ffbsj" @blur="publishBlur('ffbsj',item)" placeholder="请输入E-MAIL" /> -->
                                            <span v-else>{{moment(item.ffbsj).format('YYYY-MM')}}</span>
                                        </div>
                                    </div>
                                    <div class="inspector-table-from-d">
                                        <div class="inspector-table-text">
                                            <span class="table-text-s">期刊名称</span>
                                            <span>：</span>
                                        </div>
                                        <div class="right-content-v">
                                            <a-input v-if="djbData.djb.fsjcjzt == '填写中'" style="width: 100%;" v-model:value="item.fqkmc" @blur="publishBlur('fqkmc',item)" placeholder="请输入期刊名称" />
                                            <span v-else>{{ item.fqkmc }}</span>
                                        </div>
                                    </div>
                                    <div class="inspector-table-from-d">
                                        <div class="inspector-table-text">
                                            <span class="table-text-s">文章名称及文章所在页码</span>
                                            <span>：</span>
                                        </div>
                                        <div class="right-content-v">
                                            <a-input v-if="djbData.djb.fsjcjzt == '填写中'" style="width: 100%;" v-model:value="item.fwzmc" @blur="publishBlur('fwzmc',item)" placeholder="请输入文章名称及文章所在页码" />
                                            <span v-else>{{ item.fwzmc }}</span>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div style="display: flex;justify-content: center;" v-if="djbData.djb.fsjcjzt == '填写中'">
                                <a-button class="blue-btn" type="primary" @click="addPublishBlurClick">添加发表相关文章</a-button>
                            </div>
                        </div>
                    </div>
                    <div style="border-bottom: 5px solid #f6f6f6;margin: 8px 0;"></div>
                    <div class="itable-large-area" id="fdwyj">
                        <h3 class="text-xfl"><span class="inspector-asterisk-v">*</span>单位意见</h3>
                        <div class="itable-content-v">
                            <!-- 审评员登记表单位意见 -->
                            <compSelector
                                v-if="djbData.djb.fsjcjzt == '填写中'"
                                :key="compSelectorkey"
                                v-model="formField.fdwyj"
                                :defaultValue="formField.fdwyj"
                                compType="Radio"
                                :bigFontSize="true"
                                dictionaryType="检查员登记表单位意见"
                                @selectHandleChange="selectHandleChange('fdwyj',$event)"
                            />
                            <span v-else>{{ formField.fdwyj }}</span>
                        </div>
                    </div>
                    <div class="tips-flex" :key='currentIdKey' v-if="currentId == 'fdwyj'"><span class="tips-text-v">请选择单位意见</span></div>
                </div>
                <div style="display: flex;justify-content: center;">
                    <a-button v-if="djbData.djb.fsjcjzt == '填写中'" class="blue-btn" type="primary" @click="submitTo">提交</a-button>
                </div>
            </div>
            <div v-if="stepNum == 2 && djbData.djb.fsjcjzt == '已提交'" style="margin: 10px;margin-top: 30px;">
                <div style="display: flex;justify-content: center;margin:10px 0"><a-button size="large" class="blue-btn" type="primary" @click="exportClick">下载打印登记表</a-button></div>
                <br/>
                <br/>
                <h3>请下载登记表，打印纸质版盖公章后由单位统一上报自治区食品药品审评查验中心</h3>
                <br/>
                <h3>（若无法正常下载，请复制网址: <a :href="'https://bg.yjj.gxzf.gov.cn/t_spcyjcy-svc/api/spzx-spcy/spcyJcydjb/replateFile?id='+djbData.djb.id">{{'https://bg.yjj.gxzf.gov.cn/t_spcyjcy-svc/api/spzx-spcy/spcyJcydjb/replateFile?id='+djbData.djb.id}}</a><a-button class="blue-btn" type="primary" @click="()=>{
                    $copyText('https://bg.yjj.gxzf.gov.cn/t_spcyjcy-svc/api/spzx-spcy/spcyJcydjb/replateFile?id='+djbData.djb.id)
                    .then(() => {
                        $message.success('复制成功')
                    })
                    .catch(() => {
                        $message.warning('复制失败！');
                    });
                }">复制网址</a-button>至电脑浏览器下载打印）</h3>
                <br/>
                <div style="display: flex;justify-content: center;margin-top: 20px;">
                    <a-button class="blue-btn" type="primary" @click="WithdrawalDeclaration">撤回申报</a-button>
                </div>
            </div>
        </div>
    </div>
</template>
<script>
import {
    spcyJcydjbVerifyJcydjb,
    spcyJcydjbQueryDjbById,
    spcyJcydjbUpdateJcydjb,
    spcyJcydjbUpdateLb,
    spcyJcydjbaddDjgzjl,
    spcyJcydjbupdateGzjl,
    spcyJcydjbdeleteGzjl,
    spcyJcydjbaddDjwz,
    spcyJcydjbupdateWz,
    spcyJcydjbdeleteWz,
    spcyJcydjbsubmitJcydjb,
    spcyJcydjbupdateSjcjzt,
    spcyJcydjbreplateFile,
    spcyJcydjbgetPhoneBySfzh,
    spcyJcydjbsendYzm,
} from './service/index'
import compSelector from '@/components/compSelector/compSelector.vue'
import moment from 'moment'
import YchConstant from "@/api/YchConstant";
import validator from '@/common/validator'
import blobType from '@/common/blobType'
export default {
    components:{
        compSelector,
    },
    props:{

    },
    
    data(){
        return{
            windowWidth: window.innerWidth,
            emailSuffix:'qq.com',
            eSuffixList:['qq.com','163.com','126.com','gmail.com','sina.com','hotmail.com','icloud.com'],
            firstStepData:{
                fsfzh:'',
                code:'',
                phone:'',
            },
            YchConstant:YchConstant,
            moment:moment,
            form: this.$form.createForm(this, { name: 'fromName' }),
            rules:{
                fsfzh: [{
                    required: true,
                    message: '请输入身份证号',
                    // trigger: 'blur',
                },{
                    pattern: validator.isIdCard.reg,
                    message: '请输入正确的身份证号',
                    // trigger: 'blur',
                }],
                phone: [{
                    required: true,
                    message: '请输入手机号码',
                    // trigger: 'blur',
                },{
                    pattern: validator.isPhone.reg,
                    message: '请输入正确的手机号码',
                    // trigger: 'blur',
                }],
                code: [{
                    required: true,
                    message: '请输入验证码',
                    // trigger: 'blur',
                }]
            },
            fsfzh:'',
            djbData:{},
            stepNum:this.$route.query.stepNum,
            djbId:this.$route.query.djbId,
            compSelectorkey:null,
            formField:{},
            lbValue:[],
            jobResumeList:[{
                fgzkssj:'',
                fgzjssjstr:'',
                fgzdw:'',
                fcsgz:'',
                fzw:'',
            }],
            publishList:[{
                ffbsj:'',
                fqkmc:'',
                fwzmc:'',
            }],
            isCard:false,
            isCode:false,
            codeText:'获取验证码',
            totalSeconds:null,//总秒数
            hour:0,
            minute:0,
            second:0,
            timer: '',
            isGetCode:false,
            stepCurrent:this.$route.query.stepNum?1:0,
            lbListKey:null,
            jobResumeListKey:null,
            validateArr:[],
            validateIdData:[
            'realname','sex','fmz','fzzmm','fxl','fzc','fzw','fbyyx','fsxzy',
            'fcsgz','fgzdw','fgznx','fgzdwdz','phone','fqqhm','email'
            ],//,'lbId','jobResId','fdwyj'
            currentId:'',
            currentIdKey:null,
        }
    },
    watch:{

    },
    mounted(){
        if(this.$route.query.stepNum){
            this.refreshTable(this.$route.query.djbId)
            // this.stepCurrent = this.djbData.djb.fsjcjzt == '填写中'?1:2
        }else{
            this.stepCurrent = 0
        }
        window.addEventListener('resize', this.handleResize);
    },
    computed:{
        hourString () {
            return this.formatNum(this.hour)
        },
        minuteString () {
            return this.formatNum(this.minute)
        },
        secondString () {
            return this.formatNum(this.second)
        }
    },
    methods:{
        handleResize(){
            this.windowWidth = window.innerWidth;
        },
        idCardChange(){
            //console.log('验证中',this.firstStepData.fsfzh)
            var isIdCard = validator.isIdCard.reg
            if(isIdCard.test(this.firstStepData.fsfzh)){
                spcyJcydjbgetPhoneBySfzh({fsfzh:this.firstStepData.fsfzh}).then(res=>{
                    if(res.code == 200){
                        //console.log(res)
                        if(res.result){
                            this.firstStepData.phone = res.result
                            this.form.setFieldsValue({
                                phone:res.result,
                            });
                            this.isCode = true
                        }
                        
                    }else{
                        this.$message.warning(res.message)
                    }
                })
                this.isCard = true
            }else{
                this.firstStepData.phone = ''
                this.form.setFieldsValue({
                    phone:'',
                });
                this.isCard = false
                this.isCode = false
            }
        },
        phoneChange(){
            var isPhone = validator.isPhone.reg
            if(isPhone.test(this.firstStepData.phone)){
                this.isCode = true
            }else{
                this.isCode = false
            }
        },
        //获取验证码
        getCode(){
            if(this.isGetCode && this.second){
              return false
            }
            this.form.validateFields(['fsfzh', 'phone'], { force: true }, (err, values) => {
                //console.log(err)
              if (!err) {
                let loginParams = {
                    fsfzh:values.fsfzh,
                    phone:values.phone,
                }
                //console.log(loginParams)
                spcyJcydjbsendYzm(loginParams).then(res=>{
                    if(res.code == 200){
                        this.totalSeconds = 60
                        if (this.totalSeconds > 0) {
                            this.second = this.totalSeconds
                            this.countDowm()
                        }
                        this.isGetCode = true
                        this.firstStepData.code = 3781
                        this.$message.success(res.message)
                    }else{
                        this.$message.warning(res.message)
                    }
                })
              }
            })
        },
        countDowm () {
            var self = this
            clearInterval(this.timer)
            this.timer = setInterval(function () {
            if (self.hour === 0) {
                if (self.minute === 0 && self.second === 1){
                  self.isGetCode = false
                }
                if (self.minute !== 0 && self.second === 0) {
                  self.second = 59
                  self.minute -= 1
                } else if (self.minute === 0 && self.second === 0) {
                  self.second = 0
                  // self.$emit('countDowmEnd', true)
                  clearInterval(self.timer)
                } else {
                  self.second -= 1
                }
                
            } else {
                if (self.minute !== 0 && self.second === 0) {
                self.second = 59
                self.minute -= 1
                } else if (self.minute === 0 && self.second === 0) {
                self.hour -= 1
                self.minute = 59
                self.second = 59
                } else {
                self.second -= 1
                }
            }
            }, 1000)
        },
        formatNum (num) {
            return num < 10 ? '0' + num : '' + num
        },
        nextStep(){//下一步
            this.form.validateFields(['code'], { force: true }, (err, values) => {
                if (!err) {
                    spcyJcydjbVerifyJcydjb({fsfzh:this.firstStepData.fsfzh,code:this.firstStepData.code}).then(res=>{
                        if(res.code == 200){
                            this.stepNum = 2
                            //console.log(res.result)
                            res.result.djb.sex = res.result.djb.sex?String(res.result.djb.sex):''
                            this.djbData = res.result
                            res.result.gzjlList = res.result.gzjlList.length?res.result.gzjlList.map(item=>{
                                return {...item,fgzkssj:item.fgzkssj?moment(item.fgzkssj):'',fgzjssjstr:item.fgzjssjstr == '至今' ?item.fgzjssjstr:(item.fgzjssjstr?moment(item.fgzjssjstr):''),}}):[]
                            res.result.wzList = res.result.wzList.length?res.result.wzList.map(item=>{
                                return {...item,ffbsj:item.ffbsj?moment(item.ffbsj):''}}):[]
                            this.jobResumeList = res.result.gzjlList.length?res.result.gzjlList:[{fgzkssj:'',fgzjssjstr:'',fgzdw:'',fcsgz:'',fzw:'',}]
                            this.publishList = res.result.wzList.length?res.result.wzList:[{ ffbsj:'', fqkmc:'', fwzmc:'', }]
                            this.djbData.lbList = res.result.lbList.map(item=>{ return {
                                ...item,
                                fxzzt:item.lb.fxzzt=='1'?true:false,fcjcs:item.lb.fcjcs == '0'?'':item.lb.fcjcs,
                                // fjctz:item.lb.fjctz.split(',')
                            }})
                            this.formField = res.result.djb
                            this.currentId = ''
                            this.validateChange(this.formField)
                            this.djbId = this.djbData.djb.id
                            this.$router.replace(`/inspectorInformationTable?stepNum=`+this.stepNum+'&djbId='+this.djbData.djb.id);
                            // window.localStorage.setItem('djbId', this.djbData.djb.id);
                            this.stepCurrent = this.djbData.djb.fsjcjzt == '填写中'?1:2
                            //console.log('this.djbData',this.djbData)
                        }else{
                            this.$message.warning(res.message)
                        }
                    })
                }
            })
            
        },
        backclick(){
            var that = this
            this.$confirm({
                title:'确认要回到上一步吗？',
                onOk() {
                    that.stepNum = ''
                    that.$router.replace(`/inspectorInformationTable`);
                    that.stepCurrent = 0
                }
            })
            
        },
        refreshTable(val,tips){//刷新
            spcyJcydjbQueryDjbById({id:val}).then(res=>{
                if(res.code == 200){
                    res.result.djb.sex = res.result.djb.sex?String(res.result.djb.sex):''
                    this.djbData = res.result
                    this.djbData.lbList = res.result.lbList.map(item=>{ return {
                        ...item,
                        fxzzt:item.lb.fxzzt=='1'?true:false,fcjcs:item.lb.fcjcs == '0'?'':item.lb.fcjcs,
                        // fjctz:item.lb.fjctz.split(',')
                    }})
                    res.result.gzjlList = res.result.gzjlList.length?res.result.gzjlList.map(item=>{
                        return {...item,fgzkssj:item.fgzkssj?moment(item.fgzkssj):'',fgzjssjstr:item.fgzjssjstr == '至今' ?item.fgzjssjstr:(item.fgzjssjstr?moment(item.fgzjssjstr):'')}}):[]
                    res.result.wzList = res.result.wzList.length?res.result.wzList.map(item=>{
                        return {...item,ffbsj:item.ffbsj?moment(item.ffbsj):''}}):[]
                    this.jobResumeList = res.result.gzjlList.length?res.result.gzjlList:[{fgzkssj:'',fgzjssjstr:'',fgzdw:'',fcsgz:'',fzw:'',}]
                    this.publishList = res.result.wzList.length?res.result.wzList:[{ ffbsj:'', fqkmc:'', fwzmc:'', }]
                    this.djbId = this.djbData.djb.id
                    // //console.log('res.result.djb.email',res.result.djb.email)
                    // //console.log('res.result.djb.email',res.result.djb.email.indexOf('@'))
                    // //console.log('res.result.djb.email',res.result.djb.email.substring(res.result.djb.email.indexOf('@')))
                    // this.emailSuffix = res.result.djb.email && res.result.djb.email.indexOf('@') !== -1?(res.result.djb.email.substring(res.result.djb.email.indexOf('@')+1)):'qq.com'
                    // res.result.djb.email = res.result.djb.email?(res.result.djb.email.indexOf('@') !== -1? res.result.djb.email.substring(0,res.result.djb.email.indexOf('@')):res.result.djb.email):''
                    //console.log('后缀',this.emailSuffix)
                    //console.log('后缀',res.result.djb.email)
                    //console.log('后缀',res.result.djb.email.indexOf('@'))
                    this.formField = res.result.djb
                    this.validateChange(this.formField)
                    if(tips){
                        this.$message.success('刷新成功')
                    }
                    this.stepCurrent = this.djbData.djb && this.djbData.djb.fsjcjzt == '填写中'?1:2
                    //console.log('this.djbData',this.djbData)
                    this.currentId = ''
                    this.jobResumeListKey = Date.now()
                    this.lbListKey = Date.now()
                }else{
                    this.$message.warning(res.message)
                    this.stepNum = ''
                    this.$router.replace(`/inspectorInformationTable`);
                    this.stepCurrent = 0
                }
            })
        },
        validateChange(val){
            // validateArr
            //validateIdData
            this.validateArr = []
            this.validateIdData.forEach(item=>{
                if(!val[item]){
                    if(!this.validateArr.filter(l=>l == item).length){
                        this.validateArr.push(item)
                    }
                }
            })
        },
        basicBlur(name,val,num){
            //console.log(name,val)
            let data = {id:this.djbData.djb.id}
            data[name] = num?moment(val).format('YYYY-MM'):val
            spcyJcydjbUpdateJcydjb(data).then(res=>{
                if(res.code == 200){
                    this.refreshTable(this.djbData.djb.id)
                }else{
                    this.$message.warning(res.message)
                }
            })
        },
        selectHandleChange(name,val){
            //console.log(name,val)
            let data = {id:this.djbData.djb.id}
            data[name] = val
            spcyJcydjbUpdateJcydjb(data).then(res=>{
                if(res.code == 200){
                    this.refreshTable(this.djbData.djb.id)
                }else{
                    this.$message.warning(res.message)
                }
            })
        },
        onLbChange(val){
            spcyJcydjbUpdateLb({id:val.lb.id,fxzzt:val.fxzzt?'0':'1'}).then(res=>{
                if(res.code == 200){
                    this.djbData.lbList[val.index].fxzzt = !this.djbData.lbList[val.index].fxzzt
                    if(this.djbData.lbList[val.index].fxzzt){
                        this.$nextTick(() => {
                            // this.$refs['fcjcsInput'+val.index].focus()
                            // document.querySelector('textarea').focus()
                            document.getElementById('fcjcsInput'+val.index).focus()
                        })
                    }
                    
                }else{
                    this.refreshTable(this.djbData.djb.id)
                    this.$message.warning(res.message)
                }
            })
        },
        fcjcsBlur(id,val){//次数
            spcyJcydjbUpdateLb({id:id,fcjcs:val}).then(res=>{
                if(res.code == 200){
                    this.refreshTable(this.djbData.djb.id)
                }else{
                    this.$message.warning(res.message)
                }
            })
        },
        onTcChange(id,val){
            //console.log(id,val)
            spcyJcydjbUpdateLb({id:id,fjctz:val.length?val.join(','):''}).then(res=>{
                if(res.code == 200){
                    this.refreshTable(this.djbData.djb.id)
                }else{
                    this.$message.warning(res.message)
                }
            })
        },
        

        obResumeBlur(name,item,num){
            if(item.id){
                this.updateObResume(name,item,num)
            }else{
                spcyJcydjbaddDjgzjl({id:this.djbData.djb.id}).then(res=>{
                    if(res.code == 200){
                        //console.log('添加工作经历',res.result.id)
                        this.updateObResume(name,{...item,id:res.result.id},num)
                        this.refreshTable(this.djbData.djb.id)
                    }else{
                        this.$message.warning(res.message)
                    }
                })
            }
        },
        fgzjssjstrClick(val,item,index){
            this.jobResumeList[index].fgzjssjstr = val
            this.obResumeBlur('fgzjssjstr',item)
        },
        updateObResume(name,item,num){
            //console.log(name,item,num)
            let data = {id:item.id}
            data[name] = num?num:item[name]
            spcyJcydjbupdateGzjl(data).then(res=>{
                if(res.code == 200){
                    this.refreshTable(this.djbData.djb.id)
                }else{
                    this.$message.warning(res.message)
                }
            })
        },
        deleteJobResume(item){//删除工作经历
            var that = this
            this.$confirm({
                title:'确认要删除吗？',
                // icon: createVNode(ExclamationCircleOutlined),
                onOk() {
                    spcyJcydjbdeleteGzjl({id:item.id}).then(res=>{
                        if(res.code == 200){
                            that.refreshTable(that.djbData.djb.id)
                            that.$message.success(res.message)
                        }else{
                            that.$message.warning(res.message)
                        }
                    })
                }
            })
        },
        addWorkExpeClick(){//添加工作惊雷
            this.jobResumeList.push({
                fgzkssj:'',
                fgzjssjstr:'',
                fgzdw:'',
                fcsgz:'',
                fzw:'',
            })
            this.jobResumeListKey = Date.now()
        },
        //文章
        publishBlur(name,item,num){
            if(item.id){
                this.updatePublish(name,item,num)
            }else{
                spcyJcydjbaddDjwz({id:this.djbData.djb.id}).then(res=>{
                    if(res.code == 200){
                        //console.log('添加工作经历',res.result.id)
                        this.updatePublish(name,{...item,id:res.result.id},num)
                        this.refreshTable(this.djbData.djb.id)
                    }else{
                        this.$message.warning(res.message)
                    }
                })
            }
        },
        updatePublish(name,item,num){
            let data = {id:item.id}
            data[name] = num?num:item[name]
            spcyJcydjbupdateWz(data).then(res=>{
                if(res.code == 200){
                    this.refreshTable(this.djbData.djb.id)
                }else{
                    this.$message.warning(res.message)
                }
            })
        },
        deletePublish(item){//删除文章
            var that = this
            this.$confirm({
                title:'确认要删除吗？',
                // icon: createVNode(ExclamationCircleOutlined),
                onOk() {
                    spcyJcydjbdeleteWz({id:item.id}).then(res=>{
                        if(res.code == 200){
                            that.refreshTable(that.djbData.djb.id)
                            that.$message.success(res.message)
                        }else{
                            that.$message.warning(res.message)
                        }
                    })
                }
            })
        },
        addPublishBlurClick(){//添加工作惊雷
            this.publishList.push({
                ffbsj:'',
                fqkmc:'',
                fwzmc:'',
            })
            this.lbListKey = Date.now()
        },
        exportClick(){//下载
            var that = this
            spcyJcydjbreplateFile({id:this.djbData.djb.id}).then((data) => {
                if (!data) {
                    that.$message.warning('文件下载失败')
                    return
                }
                    let index = blobType.suffix.indexOf('.pdf')
                    let url = window.URL.createObjectURL(new Blob([data], { type:blobType.type[index] }))
                    let link = document.createElement('a')
                    link.style.display = 'none'
                    link.href = url
                    link.setAttribute('download', '审评员登记表' + '.pdf')
                    document.body.appendChild(link)
                    link.click()
                    document.body.removeChild(link) //下载完成移除元素
                    window.URL.revokeObjectURL(url) //释放掉blob对象
                // }
            })
        },
        scrollIntoViewChange(val){
            this.currentId = val
            this.currentIdKey = Date.now()
            const tabsId = document.querySelector('#'+val);
            //console.log(tabsId.offsetTop)
            document.querySelector('#'+val).scrollIntoView({
                top: tabsId.offsetTop+200,
                block: 'start',
                behavior: "smooth"
            })
        },
        submitTo(){
            if(this.validateArr.length){
                this.scrollIntoViewChange(this.validateArr[0])
            }else{
                let that = this
                this.$confirm({
                title:'确认要提交吗？',
                // icon: createVNode(ExclamationCircleOutlined),
                    onOk() {
                        spcyJcydjbsubmitJcydjb({id:that.djbData.djb.id}).then(res=>{
                            if(res.code == 200){
                                that.refreshTable(that.djbData.djb.id)
                                that.$message.success(res.message)
                            }else{
                                if(res.message.indexOf('工作简历') !== -1){
                                    that.scrollIntoViewChange('jobResId')
                                }else if(res.message.indexOf('专家分类') !== -1){
                                    that.scrollIntoViewChange('lbId')
                                }else{
                                    that.$message.warning(res.message)
                                }
                                
                            }
                        })
                    }
                })
            }
            
        },
        //撤回申报
        WithdrawalDeclaration(){
            spcyJcydjbupdateSjcjzt({ids:this.djbData.djb.id}).then(res=>{
                if(res.code == 200){
                    this.refreshTable(this.djbData.djb.id)
                    this.$message.success(res.message)
                }else{
                    this.$message.warning(res.message)
                }
            })
        }
        
    }
}
</script>
<style lang="less">
.inspector-information-table-content{
    // height: calc(100vh - 40px);
    // margin: 10px 0;
    // overflow-y: auto;
    overflow: hidden;
    .ant-steps-item-title{
        font-size:18px;
    }
    .inspector-information-bottom-v{
        height: calc(100vh - 120px);
        overflow-y: auto;
        overflow-x: hidden;
    }
    .inspector-info-step-v{
        margin: 0 10px;
        .ant-steps{
            display: flex;
        }
        .ant-steps-item-active::before{
            width: 0 !important;
            height: 0 !important;
        }
        .ant-steps-item-container{
            padding-bottom: 0;
        }
        .ant-steps-item::after{
            top: -9px;
            left: 90%;
            transform: rotate(45deg);
        }
        .ant-steps-item-icon {
            float: left;
            margin-right: 8px;
        }
        .ant-steps-item-content{
            min-height: 30px;
        }
    }
    .inspector-registration-first-step{
        margin: 10px 0;
        margin-top: 50px;
    }
    .inspector-table-from-d{
        margin:10px;
        display: flex;
        align-items: center;
        .inspector-asterisk-v{
            color:#f5222d;
            font-size: 24px;
            display: flex;
            width: 6px;
            height: 16px;
            line-height: 21px;
        }
        .inspector-table-text{
            display: flex;
            align-items: center;
            .table-text-s{
                font-weight: 500;
                text-align: right;
                display: flex;
                justify-content: flex-end;
                width: 82px;
                font-size:18px;
                .inspector-asterisk-v{
                    padding-right: 10px;
                    line-height:27px;
                }
                .first-asterisk-v{
                    line-height: 50px;
                }
            }
        }
        
        .left-text-v{

        }
        .right-content-v{
            flex: 1;
            font-size:18px;
            .inspector-table-code-btn-box{
                height: 32px;
                width: 88px;
            }
        }
        .email-suffix-v{
            display: flex;
            align-items: center;
        }
        
        
    }
    .table-from-d-car{
        align-items: flex-start;
        .table-text-car{
            height: 40px;
            line-height: 40px;
        }
    }
    
    .itable-large-area{
        margin: 10px;
        .text-xfl{
            font-weight: 600;
            display: flex;
            .inspector-asterisk-v{
                color:#f5222d;
                padding-right: 15px;
                font-size: 24px;
                display: flex;
                width: 6px;
                height: 16px;
                line-height: 29px;
            }
        }
        .itable-content-v{
            margin: 0 10px;
            font-size:18px;
            .ant-checkbox-wrapper{
                font-size:18px;
            }
            .ant-checkbox-disabled + span {
                color: rgba(0, 0, 0, 0.65);
            }
        }
    }
    
    .inspector-registration-second-step{
        margin: 10px 0;
        .tips-flex{
            display: flex;
            padding-left: 96px;
            padding-bottom: 5px;
            .tips-text-v{
                color: #f5222d;
            }
        }
    }
    .ant-input-disabled{
        background: #fff;
        color: rgba(0, 0, 0, 0.65);
    }
    .lb-list-checkbox{
        display: flex;
        align-items: flex-start;
        .ant-checkbox{
            margin-top: 7px;
        }
        .lb-type-list-v{
            .ant-checkbox{
                margin-top: 0px;
            }
        }
    }
    .a-select-option{
        font-size:18px
    }
}

</style>